package com.miroservice.chapter2.config;


import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.validation.beanvalidation.LocalValidatorFactoryBean;

@Configuration
@ComponentScan("com.miroservice")
public class AppConfig {

    /**
     * 默认会在类路径下搜索Hibernate validator的库
     * @return
     */
    @Bean
    LocalValidatorFactoryBean validator(){
        return new LocalValidatorFactoryBean();
    }

}
